package Generic;

import java.util.ArrayList;
import java.util.Collections;

public class Generic_homework {
    public static void main(String[] args) {
        ArrayList<String> poker = new ArrayList<>();
        poker.add("大王");
        poker.add("小王");
        String[] count = {"2","A","K","Q","J","10","9","8","7","6","5","4","3"};
        String[] colour ={"♣","♦","♥","♠"};
        for (String s : colour) {
            for (String s1 : count) {
                poker.add(s+s1);
            }
        }
        Collections.shuffle(poker);
        System.out.println(poker);
        ArrayList<String>[] gamer = new ArrayList[4];
        for (int i = 0; i < 54; i++) {
            if (i < 51) {
                int i1=i%3;
                String s=poker.get(i);
                gamer[i1].add(s);
            } else
            {
                gamer[4].get(i);
            }
        }
        for (int i = 0; i < 4; i++) {
            System.out.println(gamer[i]);
        }
    }
}
